package com.example.shop.merchant.dao;

import com.example.shop.merchant.dto.MerchantBriefInfo;
import com.example.shop.user.dto.UserBriefInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MerchantBriefInfoDao {

    @Results(id = "MerchantBriefInfoResultMap",value = {
            @Result(column = "merchant_id",property = "id"),
            @Result(column = "merchant_avatar",property = "avatar"),
            @Result(column = "merchant_name",property = "name"),
    })
    @Select("select merchant_id,merchant_avatar,merchant_name " +
            "from merchant where merchant_id = ${merchantId}")
    MerchantBriefInfo selectById(Long merchantId);
}
